#!/usr/bin/env python3
from tortoise import Model, fields


class Goods(Model):
    """
    商品类
    """

    id = fields.BigIntField(pk=True, index=True, description='主键id')
    sid = fields.BigIntField(description='店铺ID')
    vector_id = fields.CharField(max_length=64, unique=True, description='向量ID')

    def full_name(self) -> str:
        return f"{self.id}##{self.vector_id}"

    class Meta:
        table = 'xkyx_goods'

